package cn.com.ddapp.ddm.ui.mine;

import android.content.Intent;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;
import com.jungly.gridpasswordview.GridPasswordView;
import butterknife.BindView;
import cn.com.ddapp.ddm.R;
import cn.com.ddapp.ddm.base.BaseActivity;
//设置支付密码
public class SettingPwdActivity extends BaseActivity {

    @BindView(R.id.back)
    ImageView back;
    @BindView(R.id.titletext)
    TextView titletext;
    @BindView(R.id.gpv_setting)
    GridPasswordView gpvPassword;




    @Override
    public void initView() {
        titletext.setText(R.string.setting_payPwd);
        back.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                finish();
            }
        });
        gpvPassword.setOnPasswordChangedListener(new GridPasswordView.OnPasswordChangedListener() {
            @Override
            public void onTextChanged(String psw) {

            }

            @Override
            public void onInputFinish(String psw) {
                Intent intent = new Intent(SettingPwdActivity.this,SettingPwdAgainActivity.class);
                intent.putExtra("pwd",psw);
                startActivity(intent);
                finish();
            }
        });
    }

    @Override
    public void initData() {
    }

    @Override
    public int getContentViewId() {
        return R.layout.activity_setting_pwd;
    }

    @Override
    protected String getFragmentTag() {
        return null;
    }
}
